home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 October: Technology Seed / ADC Seed CD - October 1999.toast / FireWire / FireWire_2.1_SDK_DR3 / Source / FWiX / FWiXApp / FWiXdrag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-17  |  3.3 KB  |  146 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FWXdrag.h
  3.  
  4.     Contains:    Definitions for FireWire Exchange application.
  5.  
  6.     Version:    1.0
  7.  
  8.     Written by:    Jay Lloyd
  9.  
  10.     Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     File Ownership:
  13.  
  14.         DRI:                Jay Lloyd
  15.  
  16.         Other Contact:        
  17.  
  18.         Technology:            FireWire
  19.  
  20.     Writers:
  21.  
  22.         (jkl)    Jay Lloyd
  23.  
  24.     Change History (most recent first):
  25.  
  26.         <11>     1/15/98    jkl        Update for new headers.
  27.       <FW10>      5/7/97    jkl        Updated list data structures to be double linked lists.
  28.        <FW9>     3/18/97    jkl        Added definitions for icon and name drqag hiliting.
  29.        <FW8>     2/27/97    jkl        Updated grid spacing for better scrolling support.
  30.        <FW7>     2/21/97    jkl        Modified grid constants for sender window icon placement.
  31.        <FW6>      2/6/97    ES        Added list of nodes we've opened to the WindowData record.
  32.        <FW5>     1/27/97    jkl        Added a timer task record and send items precheck list to the
  33.                                     receive node record.
  34.        <FW4>     1/16/97    jkl        Added user interface features for alpha candidate. Added scroll
  35.                                     bars and windowView to window data. Modified sizes and spacing
  36.                                     for window icons.
  37.        <FW3>      1/8/97    ES        Changed to use FWX nodes instead of FWX drivers.
  38.        <FW2>    11/13/96    jkl        Added receive node name to receiver record.
  39.        <FW1>     10/2/96    jkl        initial check-in
  40. */
  41.  
  42. #ifndef __FWXDRAG__
  43. #define __FWXDRAG__
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. #if PRAGMA_IMPORT_SUPPORTED
  50. #pragma import on
  51. #endif
  52.  
  53. #if PRAGMA_ALIGN_SUPPORTED
  54. #pragma options align=mac68k
  55. #endif
  56.  
  57. //    My AppleEvent ID defs
  58. enum
  59. {
  60.     kPrivateEventClass        = 'Sprv',
  61.     kAEFileSpecList            = 'FSpL',
  62.     kAEFSSpecKey            = 'FSpK',
  63.     kAEFSSpecCountKey        = 'FSpC'
  64. };
  65.  
  66. // drag handling constants
  67. enum
  68. {
  69.     kNoSpace        = -1,
  70.     kHiliteInit        = 1,
  71.     kHiliteOn        = 2,
  72.     kHiliteOff        = 3,
  73.     kHiliteDispose    = 4
  74. };
  75.     
  76. // icon drawing constants
  77. enum
  78. {
  79.     kLargeIconFill    = 32,
  80.     kLargeHFill        = 48,
  81.     kLargeHSize        = 128,
  82.     kLargeVFill        = 9,
  83.     kLargeVSize        = 64,
  84.     kLargeRowCount    = 5,
  85.     
  86.     kSmallIconFill    = 16,
  87.     kSmallHFill        = 20,
  88.     kSmallHSize        = 170,
  89.     kSmallVFill        = 10,
  90.     kSmallVSize        = 24,
  91.     kSmallRowCount    = 10,
  92.     
  93.     kLargeIconView    = 1,
  94.     kSmallIconView    = 2    
  95. };
  96.  
  97. typedef struct OpenNodeRecord    OpenNodeRecord,
  98.                                 *OpenNodePtr;
  99. struct OpenNodeRecord
  100. {
  101.     OpenNodePtr        pNextNode,                // keeps the node list
  102.                     pPreviousNode;
  103.     FWXNodeID        nodeID;                    // firewire node id
  104. };
  105.  
  106. typedef struct RecvNodeRecord    RecvNodeRecord,
  107.                                 *RecvNodePtr;
  108. struct RecvNodeRecord
  109. {
  110.     RecvNodePtr        pNextNode,                // keeps list of nodes
  111.                     pPreviousNode;
  112.     Rect            recvNodeIconRect;        // Rect for node drag detection
  113.     Rect            recvNodeTextRect;        // Rect for node drag detection
  114.     FWXNodeID        nodeID;                    // node FireWire id
  115.     NodeSendItemPtr    pTxItemList;            // list of items to send
  116.     MyTMTaskPtr        pReplyTimer;            // timer record for waiting for reply
  117.     Str32            nodeName;                // macintosh name of node
  118. };
  119.  
  120. typedef struct WindowData    WindowData,
  121.                             *WindowDataPtr;
  122. struct WindowData
  123. {
  124.     ControlHandle    hVScrollBar;        // vertical scroll bar
  125.     ControlHandle    hHScrollBar;        // horizontal scroll bar
  126.     OpenNodePtr        pOpenNodeList;        // points to first open node
  127.     SInt32            numOpenNodes;        // keeps count of opened nodes
  128.     RecvNodePtr        pRecvNodeList;        // points to first node with fwix running
  129.     SInt32            numRecvNodes;        // keeps count of nodes
  130.     SInt32            windowView;            // large or small icon
  131. };
  132.  
  133.  
  134. #if PRAGMA_ALIGN_SUPPORTED
  135. #pragma options align=reset
  136. #endif
  137.  
  138. #if PRAGMA_IMPORT_SUPPORTED
  139. #pragma import off
  140. #endif
  141.  
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145.  
  146. #endif